<article class="cl pd-20">
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            <a href="javascript:;" onclick="del_all()" class="btn btn-danger radius">
                <i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
            <a class="btn btn-primary radius" href="javascript:save(0);">
                <i class="Hui-iconfont">&#xe600;</i> 添加角色</a>
        </span>
        <span class="r">共有数据：<strong>{$list|count}</strong> 条</span> 
    </div>
    <div class="mt-10">
        <table class="table table-border table-bordered table-hover table-bg">
            <thead>
                <tr>
                    <th scope="col" colspan="6">角色管理</th>
                </tr>
                <tr class="text-c">
                    <th width="25">
                        <input type="checkbox" value="" name="allcheck">
                    </th>
                    <th width="40px">ID</th>
                    <th width="120px">角色名称</th>
                    <th>权限(menu_ids)</th>
                    <th width="160px">备注</th>
                    <th width="80px">操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach $list as $val}
                <tr class="text-c">
                    <td>
                        <input type="checkbox" value="{$val.roleid}" name="checkbox[]">
                    </td>
                    <td>{$val.roleid}</td>
                    <td>{$val.name}</td>
                    <td>{$val.permissions}</td>
                    <td>{$val.remark}</td>
                    <td class="f-14">
                        <a title="编辑" href="javascript:save({$val.roleid});" style="text-decoration:none">
                            <i class="Hui-iconfont">&#xe6df;</i>
                        </a>
                        <a title="删除" href="javascript:;" onclick="del(this,'{$val.roleid}')" class="ml-5"
                            style="text-decoration:none">
                            <i class="Hui-iconfont">&#xe6e2;</i>
                        </a>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
    </div>
</article>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    function save(id) {
        var title = id==0 ? '添加角色' : '修改角色'
        var url = "{:url('save')}" + "?_layer=true&id=" + id
        layer_show(title, url, 800, 700);
    }
</script>
<!--请在上方写此页面业务相关的脚本-->